import os

import pytest
from selenium import webdriver

@pytest.fixture(scope='function')
def getdriver():
    driver=None
    if 'chrome' == os.getenv('drivertype'):
        driver=webdriver.Chrome()
    if driver is None:
        print('未匹配到合适的浏览器')
        return
    driver.maximize_window()
    driver.implicitly_wait(6)
    yield driver